package com.song.crud.service;

import com.song.crud.dao.DepartmentMapper;
import com.song.crud.pojo.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 宋超
 * HP - the login name of the current user.
 * 2020/10/15 - the current system date.
 * 10:24 - the current system time.
 */
@Service
public class DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    /**
     * 返回部门信息
     * @return
     */
    public List<Department> getAll() {
        List<Department> list = departmentMapper.selectByExample(null);
        return list;
    }
}
